package com.card.db.entity;

import androidx.room.Entity;
import androidx.room.PrimaryKey;

/**
 * 用户实体类
 */
@Entity
public class User {
    /**
     * id 主键 自动增长
     */
    @PrimaryKey(autoGenerate = true)
    public int id;

    /**
     * 手机电话号码
     */
    public String telephone;

    /**
     * 密码
     */
    public String password;

    public User(String telephone, String password) {
        this.telephone = telephone;
        this.password = password;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", telephone='" + telephone + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
